//刷新
function flus(){
    location.reload()
}
function orderbyDate(id){
    //清空节点
    var $body=$(".mhy-article-list__body")
    $body.children('div').remove();
    $.ajax({
        url: "QueryPTbyDateServlet",
        data: {"id":id},
        type: "post",
        dataType: "json",
        success:function (posts){
            for (var i=0;i<posts.length;i++){
                var offical ="";
                if(posts[i].is_official=="1"){
                    offical="官方"
                }
                var $Div=" <div class=\"mhy-article-card\">\n" +
                    "                                            <div class=\"mhy-article-card__header\">\n" +
                    "                                                <div class=\"mhy-article-card__userinfo\">\n" +
                    "                                                    <div class=\"mhy-user-card mhy-article-card__user mhy-user-card-xs\">\n" +
                    "                                                        <a href=\"https://www.miyoushe.com/ys/accountCenter/postList?id=75276539\" class=\"mhy-router-link mhy-user-card__link\" target=\"_blank\">\n" +
                    "                                                            <div class=\"mhy-avatar mhy-user-card__avatar mhy-avatar__xs\">\n" +
                    "                                                                <img src=\"image/"+posts[i].avatar+"\" class=\"mhy-avatar__img\">\n" +
                    "                                                                <!---->\n" +
                    "                                                                <div class=\"mhy-avatar__auth\">\n" +
                    "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"mhy-authentication-mark\">\n" +//认证图标
                    "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"image/"+posts[i].certification+".png\" class=\"mhy-img-icon mhy-authentication-mark__icon\">\n" +
                    "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n" +      /*level16.png*/
                    "                                                                </div>\n" +
                    "                                                            </div>\n" +
                    "                                                        </a>\n" +
                    "                                                        <div class=\"mhy-user-card__info\">\n" +
                    "                                                            <a href=\"https://www.miyoushe.com/ys/accountCenter/postList?id=75276539\" class=\"mhy-router-link mhy-account-title mhy-user-card__link\" target=\"_blank\" title=\"原神\">\n" +
                    "                                                                <span class=\"mhy-account-title__name\">"+posts[i].nickname+"</span>\n" +
                    "                                                                <img src=\"image/level"+posts[i].level+".png\" class=\"mhy-img-icon mhy-account-title__level\">\n" +
                    "                                                                <!---->\n" +
                    "                                                                <!---->\n" +
                    "                                                                <!---->\n" +
                    "                                                            </a>\n" +
                    "                                                            <!---->\n" +
                    "                                                            <!---->\n" +
                    "                                                            <!---->\n" +
                    "                                                        </div>\n" +
                    "                                                    \n" +
                    "                                                    </div>\n" +
                    "                                                    <p class=\"mhy-article-card__info\">\n" +
                    "                                                        \n" +
                    "                                                        • 官方\n" +
                    "\n" +
                    "                                                    </p>\n" +
                    "                                                    <span class=\"mhy-account-center-time__small mhy-article-card__info\"> · 原神</span>\n" +
                    "                                                </div>\n" +
                    "                                                <!---->\n" +
                    "                                                <!---->\n" +
                    "                                            </div>\n" +
                    "                                            <a href=\"https://www.miyoushe.com/ys/article/54564295\" class=\"mhy-router-link mhy-article-card__link\" target=\"_blank\">\n" +
                    "                                                <div class=\"mhy-article-card__title\">\n" +
                    "                                                    <div class=\"mhy-article-type mhy-article-card__type\">\n" +
                    "                                                        <!---->\n" +
                    "                                                        <span class=\"mhy-article-type__label mhy-article-type__official\">"+offical+"</span>\n" +
                    "                                                    </div>\n" +
                    "                                                    <h3 title=\"\" class=\"mhy-article-card__h3\">"+posts[i].subject+"</h3>\n" +
                    "                                                    <!---->\n" +
                    "                                                </div>\n" +
                    "                                                <div class=\"mhy-article-card__content\">"+posts[i].content+"</div>\n" +
                    "                                                <div class=\"mhy-article-card__preview\">\n" +
                    "                                                    <div preview=\"54564295\"  class=\"mhy-article-card__img\"  lazy=\"loaded\" style=\"background-image: url('image"+"/"+posts[i].cover+"');\" data-pswp-uid=\"1\">\n" +
                    "                                                        <!---->\n" +
                    "                                                    </div>\n" +
                    "                                                    <div large=\"https://upload-bbs.miyoushe.com/upload/2024/07/03/75276539/27dcffa2946c869aa503d959b9ea6f8e_4898560149043245997.png\" preview=\"54564295\" class=\"mhy-article-card__thumb\" data-pswp-uid=\"2\"></div>\n" +
                    "                                                    <span class=\"mhy-article-card__imgnum\">\n" +
                    "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 512 512\"><path d=\"M64 144v304h303.9V144H64zm287.9 288H80V160h271.9v272z\" fill=\"currentColor\"/><path d=\"M448 64H144v64h16V80h272v272h-48v16h64z\" fill=\"currentColor\"/></svg>\n" +
                    "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span>+2</span>\n" +
                    "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</span>\n" +
                    "                                                </div>\n" +
                    "                                            </a>\n" +
                    "                                            <div class=\"mhy-article-card__footer\">\n" +
                    "                                                <!---->\n" +
                    "                                                <!---->\n" +
                    "                                                <div class=\"mhy-article-card__data\">\n" +
                    "                                                    <!---->\n" +
                    "                                                    <a href=\"https://www.miyoushe.com/ys/article/54564295#reply\" class=\"mhy-router-link mhy-article-card__data-item\" target=\"_blank\">\n" +
                    "                                                        <img class=\"mhy-icon iconfont icon-liuyanshu\" src='image/评论h.png'>\n" +
                    "                                                     <!--评论数-->   <span>"+posts[i].max_floor+"</span>\n" +
                    "                                                    </a>\n" +
                    "                                                    <div class=\"mhy-article-card__data-item\">\n" +
                    "                                                        <div class=\"mhy-heart-click\">\n" +
                    "                                                            <img class=\"mhy-symbol-icon mhy-heart-click__icon\" src='image/点赞.png'>\n" +
                    "                                                                \n" +
                    "                                                            \n" +
                    "                                                        </div>\n" +
                    "                                                      <!---->  <span>"+posts[i].clickCount+"</span>\n" +
                    "                                                    </div>\n" +
                    "                                                </div>\n" +
                    "                                            </div>\n" +
                    "                                        </div>";

                $body.append($Div);
            }
        }
    })
}